package com.oop.demo01;

//学生类
public class Student {
    //属性
    String name;
    int age;

    //方法
    public void study(){
        System.out.println(this.name + "在学习 ");
    }
}


/*
//测试类
* public static void main(String[] args) {
        //类 实例化
        //类实例化的结果会返回一个自己的对象
        //student对象就是一个Student类的具体实例
        Student tom = new Student();
        Student alice = new Student();
        System.out.println("默认初始化：");
        System.out.println("name：" +tom.name);
        System.out.println( "age:" + tom.age);
        System.out.println("调用成员修改属性：");
        tom.name = "tom";
        tom.age  =  3;
        System.out.println("name: " +tom.name);
        System.out.println( "age: " + tom.age);
    }
*
*
* */